#ifndef __THERMAL_H__
#define __THERMAL_H__

#include <Arduino.h>
#include "rtthread.h"

#define THERMAL_IMG_WIDTH       32
#define THERMAL_IMG_HEIGHT      24
#define THERMAL_IMG_SIZE        (THERMAL_IMG_WIDTH * THERMAL_IMG_HEIGHT)

typedef struct
{
    float temp_img[THERMAL_IMG_SIZE];
    float center_temp;
}thermal_data_t;

rt_err_t thermal_cam_init(void);
rt_err_t thermal_cam_loop(void);

int MLX90640_I2CRead(uint8_t slave_addr, uint16_t start_addr, uint16_t size, uint16_t *data);
int MLX90640_I2CWrite(uint8_t slave_addr, uint16_t reg_addr, uint16_t data);

#endif /* __THERMAL_H__ */
